<template>
  <div class="game-page">
    <div class="page-header">
      <h1>2048 游戏</h1>
      <p>使用方向键或 WASD 键控制方块移动，合并相同数字达到2048！</p>
    </div>
    <Game2048 />
  </div>
</template>

<script>
import Game2048 from '@/components/Game2048.vue'

export default {
  name: 'Game2048Page',
  components: {
    Game2048
  }
}
</script>

<style scoped>
.game-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 3rem 0;
  background: 
    linear-gradient(rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.8)), 
    url('/images/hero-bg.jpg') center/cover no-repeat;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  margin: -2rem -2rem 2rem -2rem;
  position: relative;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 1px solid rgba(100, 181, 246, 0.2);
  border-radius: 0 0 20px 20px;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(151, 220, 153, 0.1) 100%);
  z-index: 1;
}

.page-header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(100, 181, 246, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
  z-index: 1;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.page-header h1 {
  font-size: 3rem;
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

.page-header p {
  color: #e0e0e0;
  font-size: 1.3rem;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .game-page {
    padding: 1rem;
  }
  
  .page-header {
    padding: 2rem 0;
    margin: -1rem -1rem 2rem -1rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-header p {
    font-size: 1.1rem;
  }
}
</style>

